<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class IndexMenu extends Node
{

    protected $childAuthorityName;
    //protected $nodeId=0;
    protected $roles;

    //rewrite de constructor as you want
    /*
      function  __construct() {
      $this->policyName='default_policy';
      }
     */

    function setSection( $policy )
    {
        $this->childAuthorityName = $policy;
        //  $this->nodeId=$id;
    }

    function setRoles( $roles )
    {
        $this->roles = $roles;
    }

    function fill()
    {
        $this->appendChild( Node::getInstance( $this->childAuthorityName,
                        $this->childAuthorityName, $this->roles ) );
    }

    function handleGET( Event $e )
    {
        //parent::handleGET($e);
        if ( $e->tag == 'section' ) {
            $this->_setSection( $_GET[ 'policy' ] );
        }
    }

}

?>
